#include <iostream>  
using namespace std;

// 基类
class Shape
{
    public:
        void setWidth(int w)
        {  
            width = w;
        }
        void setHeight(int h)
        {  
            height = h;
        }

    protected:
        int width;  
        int height;
};

// 基类 PaintCost  
class PaintCost 
{
public:
    int getCost(int area)
    {
        return area * 20;
    }
};

// 派生类
class Rectangle: public Shape, public PaintCost
{  
    public:
        int getArea()
        {
            return (width * height);
        }
};

int main()
{
    Rectangle myrect;
    myrect.setHeight(4);
    myrect.setWidth(5);


    cout<<myrect.getCost(myrect.getArea())<<endl;
    return 0;

}


